package com.cd.song.api.impl;

import com.cd.song.api.SongTagService;
import com.cd.song.jpa.domain.SongTag;

import com.cd.song.jpa.repo.SongTagRepo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Optional;

@Service
public class SongTagServiceImpl implements SongTagService {

    @Autowired
    private SongTagRepo songTagRepository;

    @Override
    public List<SongTag> findAll() {
        return songTagRepository.findAll();
    }

    @Override
    public Optional<SongTag> findById(Long id) {
        return songTagRepository.findById(id);
    }

    @Override
    public SongTag save(SongTag songTag) {
        return songTagRepository.save(songTag);
    }

    @Override
    public void deleteById(Long id) {
        songTagRepository.deleteById(id);
    }
}